import pandas as pd


def pandas_sort(frame):
    # 方式一：通过索引排序
    frame.sort_index(ascending=False)
    # 方式二：通过列排序指定by可以是当个值，也可以是列表
    frame.sort_values(by="height",inplace=True)
    print(frame)



if __name__ == '__main__':
    data = {
        "name": ["小红", "小蓝", "小绿"],
        "age": [18, 18, 20],
        "height": [175, 165, 185],
        "framework": ["python", "java", "javaScript"]
    }
    frame = pd.DataFrame(data)
    pandas_sort(frame)
